
<%@ include file="../before.jsp"%>
<h1>Tournament admin!</h1>

<p>${result}</p>

<c:forEach items="${tournaments}" var="entry">
    		Key = ${entry.key}, value = ${entry.value} <a
		href="/tourbuilder/tournament/admin/delete/${entry.value.id}">Delete</a>
		
		<a
		href="/tourbuilder/bracket/admin/createBracket/${entry.value.id}">Create brackets!</a>
	<br>
</c:forEach>

<p>Add tournament</p>

<form:form commandName="tournament"
	action="/tourbuilder/tournament/admin/add">
	<p>Navn</p>
              Tournament name: <input type="text" name="name" />
	<br />
		
              Start date (format: 19.08 19:30): <input type="text" name="startDate" />
	<br />
              End date (format: 19.08 19:30): <input type="text" name="endDate" />
	<br />
              Size:
             	 
				<select name="size">
					<option value="TWO">2</option>
					<option value="FOUR">4</option>
					<option value="EIGHT">8</option>
					<option value="SIXTEEN">16</option>
					<option value="THIRTYTWO">32</option>
				</select>

	<br />
	<p>
		<input type="submit" value="Create tournament" />
	</p>
</form:form>

<%@ include file="../after.jsp"%>